﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using Digitalmes.Model.EquipmentManagement;
using Digitalmes.Model;

namespace Digitalmes.ViewModel.EquipmentManagement.EquipmentAlarmItemVMs
{
    public partial class EquipmentAlarmItemTemplateVM : BaseTemplateVM
    {
        
        [Display(Name = "_Model._EquipmentAlarmItem._EquipName")]
        public ExcelPropety EquipName_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.EquipName);
        [Display(Name = "_Model._EquipmentAlarmItem._EquipTag")]
        public ExcelPropety EquipTag_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.EquipTagId);
        [Display(Name = "_Model._EquipmentAlarmItem._Level")]
        public ExcelPropety Level_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.Level);
        [Display(Name = "_Model._EquipmentAlarmItem._EquipTagName")]
        public ExcelPropety EquipTagName_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.EquipTagName);
        [Display(Name = "_Model._EquipmentAlarmItem._EquipTagAddress")]
        public ExcelPropety EquipTagAddress_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.EquipTagAddress);
        [Display(Name = "_Model._EquipmentAlarmItem._Classify")]
        public ExcelPropety Classify_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.Classify);
        [Display(Name = "_Model._EquipmentAlarmItem._Content")]
        public ExcelPropety Content_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.Content);
        [Display(Name = "_Model._EquipmentAlarmItem._Bits")]
        public ExcelPropety Bits_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.Bits);
        [Display(Name = "_Model._EquipmentAlarmItem._Active")]
        public ExcelPropety Active_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.Active);
        [Display(Name = "_Model._EquipmentAlarmItem._Aux_1")]
        public ExcelPropety Aux_1_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.Aux_1);
        [Display(Name = "_Model._EquipmentAlarmItem._Aux_2")]
        public ExcelPropety Aux_2_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.Aux_2);
        [Display(Name = "_Model._EquipmentAlarmItem._CreateTime")]
        public ExcelPropety CreateTime_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.CreateTime, true);
        [Display(Name = "_Model._EquipmentAlarmItem._UpdateTime")]
        public ExcelPropety UpdateTime_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.UpdateTime, true);
        [Display(Name = "_Model._EquipmentAlarmItem._CreateBy")]
        public ExcelPropety CreateBy_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.CreateBy);
        [Display(Name = "_Model._EquipmentAlarmItem._UpdateBy")]
        public ExcelPropety UpdateBy_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.UpdateBy);
        [Display(Name = "_Model._EquipmentAlarmItem._IsValid")]
        public ExcelPropety IsValid_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.IsValid);
        [Display(Name = "_Model._EquipmentAlarmItem._TenantCode")]
        public ExcelPropety TenantCode_Excel = ExcelPropety.CreateProperty<EquipmentAlarmItem>(x => x.TenantCode);

	    protected override void InitVM()
        {
            
            EquipTag_Excel.DataType = ColumnDataType.ComboBox;
            EquipTag_Excel.ListItems = DC.Set<EquipmentTag>().GetSelectListItems(Wtm, y => y.TenantCode.ToString());

        }

    }

    public class EquipmentAlarmItemImportVM : BaseImportVM<EquipmentAlarmItemTemplateVM, EquipmentAlarmItem>
    {
            //import

    }

}